package com.letoken.platform.repo.admin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.letoken.platform.repo.admin.po.AdminCommunityConfig;
import com.letoken.platform.repo.app.req.user.UserLevelReq;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 社区服务奖配置表 Mapper 接口
 * </p>
 *
 * @author 作者
 * @since 2024-02-29
 */
public interface AdminCommunityConfigMapper extends BaseMapper<AdminCommunityConfig> {
    List<UserLevelReq> selectUserLevelCommunity(@Param("userId") Integer userId);

    List<UserLevelReq> selectUserLevelCommunityBywithdraw(@Param("userId") Integer userId);

    @Select("  select max(rate) from  admin_community_config limit 1")
    BigDecimal maxRate();

    @Select("  select max(reward_rate) from  admin_community_config limit 1")
    BigDecimal maxRewardRate();
}
